<div id="header">
    <h1><a href="<%= HOME %>"><img src="/images/logo.png" style="margin-left: -90px; margin-bottom: -40px;" /></a></h1>
    <p class="payoff">
        努力做最好的中文Rails技术社区
    </p>
	<form id="searchform" method="get" action="<%= HOME %>/search">
	<div>
		<input value="search..." onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" type="text">
		<button type="submit"><img src="/images/cerca.jpg" alt="search"></button>
	</div>
	</form>
    <p id="rss">
    	<%= link_to image_tag("/images/feed.png"), HOME + "/index.rss" %>
	</p>
    <div id="header_menu">
        <ul>
            <li<% if @current_menu == :index %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>" title="首页">首页</a>
            </li>
            <li<% if @current_menu == :blog %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/blogs" title="博客">博客</a>
            </li>
			<li<% if @current_menu == :tutorial %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/tutorials" title="教程">教程</a>
            </li>
            <li<% if @current_menu == :resource %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/resources" title="资源">资源</a>
            </li>
			<li<% if @current_menu == :forum %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/forums" title="论坛">论坛</a>
            </li>
			<li<% if @current_menu == :tag %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/tags" title="标签">标签</a>
            </li>
			<% if (!logged_in? && @user) || (logged_in? && @user && current_user.id != @user.id) %>
			<li class="current_page_item">
                <a href="http://<%= @user.login %>.beyondrails.com" title="<%= @user.login %>的首页"><%= @user.login %>的首页</a>
            </li>
			<% end %>
			<% if logged_in? %>
			<li<% if @user && current_user.id == @user.id %> class="current_page_item"<% end %>>
                <a href="http://<%= current_user.login %>.beyondrails.com" title="我的首页">我的首页</a>
            </li>
			<% end %>
			<% if logged_in? && current_user.is_admin %>
			<li<% if @admin %> class="current_page_item"<% end %>>
                <a href="<%= HOME %>/admin" title="后台管理">后台管理</a>
            </li>
			<% end %>
        </ul>
    </div>
</div>